<include file="Public:header" />
<div class="page-member subpage">
    <div class="form-header">
        <div>
            <div class="line1">
                <div class="fl"><h3>欠缴租金信息 / 新增</h3></div>
                <div class="fr hidden">
                    <form class="search-form" method="post" action="">
                        <input name="field" value="{$filter.field}" type="text" />
                        <input name="value" value="{$filter.value}" type="text" />
                        <input name="page" value="{$filter.page}" type="hidden" />
                        <input name="order_field" value="{$filter.order_field}" type="hidden" />
                        <input name="order_sort" value="{$filter.order_sort}" type="hidden" />
                        <button class="btn-normal" type="submit">查 询</button>
                    </form>
                </div>
            </div>
            <div class="line2">
                <div class="fl form-btn-group">
                    <in name="$x|default='02-03-02'" value="$rightsCode">
                        <button onclick="submitForm();" class="btn-save btn-highlight">保 存</button>
                        <else />
                        <button disabled="disabled" class="btn-save btn-disable">保 存</button>
                    </in>
                    <span>或</span>
                    <a class="linkBtn btn-abort" href="/admin/charge/index">放弃</a>
                </div>
            </div>
        </div>
    </div>
    <div class="form-box2">
        <div>
            <form id="chargeForm" method="post" action="">
                <input type="hidden" name="id" id="id" value="{$charge.id}" />
                <table class="form">
                    <tr>
                        <th width="15%">房源地址<span class="hint">*</span></th>
                        <td width="35%">
                            <input type="text" name="house_addr" />
                            <input type="hidden" name="house_no" />
                            <input type="hidden" name="type" />
                            <input type="hidden" name="contact_no" />
                        </td>
                        <th width="15%">小区名称<span class="hint">*</span></th>
                        <td width="35%"><input type="text" name="community" /></td>
                    </tr>
                    <tr>
                        <th>姓名<span class="hint">*</span></th>
                        <td field="name"><input type="text" name="name" /></td>
                        <th>联系电话<span class="hint">*</span></th>
                        <td field="phone"><input type="text" name="phone" /></td>
                    </tr>
                    <tr>
                        <th>身份证号<span class="hint">*</span></th>
                        <td><input type="text" name="idno" /></td>
                        <th>低保人口<span class="hint">*</span></th>
                        <td><input type="text" name="dibaork" /></td>
                    </tr>
                    <tr>
                        <th>月租金</th>
                        <td field="zj"><input type="text" name="zj" /></td>
                        <th>市场月租金</th>
                        <td field="mzj"><input type="text" name="mzj" /></td>
                    </tr>
                    <tr>
                        <th>房源面积</th>
                        <td field="size"><input type="text" name="size" /></td>
                        <th>业务申请编号</th>
                        <td field="yw_no"><input type="text" name="yw_no" /></td>
                        <th style="display: none">年审编号</th>
                        <td style="display: none" field="no"><input type="text" name="no" /></td>
                    </tr>
                    <tr>
                        <td></td><td></td><td></td><td></td>
                    </tr>
                    <tr>
                        <th>租金起始日期<span class="hint">*</span></th>
                        <input type="hidden" name="year" value="" />
                        <td field="date1"><input id="date1" placeholder="必填" type="text" name="date1" /></td>
                        <th>租金结束日期<span class="hint">*</span></th>
                        <td field="date2"><input id="date2" placeholder="必填" type="text" name="date2" /></td>
                    </tr>
                    <tr><th>欠缴总租金<span class="hint">*</span></th>
                        <td field="total"><input type="text" name="total" /></td>
                        <th>租金减免类型<span class="hint">*</span></th>
                        <td>
                            <select name="derate_type">
                                <option value="" derate="0">-- 请选择租金减免类型 --</option>
                                <volist name="derate_type" id="vo">
                                    <if condition="$charge[derate_type] eq $vo[0]">
                                        <option selected="selected" value="{$vo[0]}" derate="{$vo[1]}">{$vo[0]}</option>
                                        <else />
                                        <option value="{$vo[0]}" derate="{$vo[1]}">{$vo[0]}</option>
                                    </if>
                                </volist>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>减免后应缴金额<span class="hint">*</span></th>
                        <td>
                            <input type="text" value="0.00" name="total2" />
                            <input type="hidden" value="0.00" name="derate_money" />
                        </td>
                        <th>备注</th>
                        <td field="remarks" colspan="3"><input type="text" name="remarks" /></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<link type="text/css" href="__JS__/datetimepicker/pikaday.css" rel="stylesheet">
<script src="__JS__/datetimepicker/pikaday.min.js" type="text/javascript"></script>
<link type="text/css" href="__JS__/autocomplete2/src/jquery.autocomplete.min.css" rel="stylesheet">
<script src="__JS__/autocomplete2/src/jquery.autocomplete.js" type="text/javascript"></script>
<script>
    $('input[name=house_addr]').autocomplete({
        serviceUrl: '/admin/charge/ajax_SearchHouseByAddr',
        extraParams: {house_addr: $.trim($("input[name=no]").val())},//动态参数值
        paramName: "house_addr",//自定义的参数名 必须和extraParams 参数名相同
        showNoSuggestionNotice: true,
        noSuggestionNotice: '对不起，没有匹配到房源地址',
        onSelect: function (suggestion) {
            $("input[name=community]").val(suggestion.data.community);
            $("input[name=house_no]").val(suggestion.data.name);
            $("input[name=name]").val(suggestion.data.zhname);
            $("input[name=phone]").val(suggestion.data.phone);
            $("input[name=idno]").val(suggestion.data.zhidno);
            $("input[name=dibaork]").val(suggestion.data.dibaork);
            $("input[name=yw_no]").val(suggestion.data.yw_no);
            $("input[name=type]").val(suggestion.data.type);
            $("input[name=contact_no]").val(suggestion.data.contact_no);
            $("input[name=zj]").val(suggestion.data.zj);
            $("input[name=mzj]").val(suggestion.data.mzj);
            $("input[name=size]").val(suggestion.data.size);
        }
    });
</script>

<script src="__JS__/charge.js?v=0.4" type="text/javascript" ></script>
<include file="Public:footer" />
